n1, n2, k1, k2 = map(int, input().split())
dp = [[[[0]*2 for _ in range(11)] for _ in range(101)] for _ in range(101)]
mod = int(1e8)
dp[1][0][1][0] = dp[0][1][1][1] = 1
for i in range(n1+1):
for j in range(n2+1):
if i > 0:
for k in range(2, k1+1):
dp[i][j][k][0] = dp[i-1][j][k-1][0]
for k in range(1, k2+1):
dp[i][j][1][0] = (dp[i][j][1][0]+dp[i-1][j][k][1]) % mod
if j > 0:
for k in range(2, k2+1):
dp[i][j][k][1] = dp[i][j-1][k-1][1]
for k in range(1, k1+1):
dp[i][j][1][1] = (dp[i][j][1][1]+dp[i][j-1][k][0]) % mod
res = 0
for i in range(1, k1+1):
res = (res+dp[n1][n2][i][0]) % mod
for i in range(1, k2+1):
res = (res+dp[n1][n2][i][1]) % mod
print(res % mod)
#include "bits/stdc++.h"
#define pf printf
#define sf scanf
#define db double
#define ll long long
#define siz 20000001
#define MAXN 100001
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
ll mod = 100000000;
ll gcd(ll a, ll b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}
ll powerwithmod(ll a, ll b)
{
ll res = 1;
while (b)
{
if (b & 1)
res = (res * a) % mod;
b >>= 1;
a = (a * a) % mod;
}
return res;
}
using namespace std;
ll dp[101][101][11][11];
ll solve(ll k1, ll k2, ll l1, ll l2, ll cur1, ll cur2)
{
// cout<<k1<<" "<<k2<<"\n";
if(k1==0&&k2==0)
{
return 1;
}
if (k1 < 0 || k2 < 0)
{
return 0;
}
if (dp[k1][k2][cur1][cur2] != -1)
{
return dp[k1][k2][cur1][cur2] % mod;
}
if (l1 == cur1)
{
dp[k1][k2][cur1][cur2] = solve(k1, k2 - 1, l1, l2, 0, 1);
dp[k1][k2][cur1][cur2] %= mod;
return dp[k1][k2][cur1][cur2];
}
if (l2 == cur2)
{
dp[k1][k2][cur1][cur2] = solve(k1 - 1, k2, l1, l2, 1, 0);
dp[k1][k2][cur1][cur2] %= mod;
return dp[k1][k2][cur1][cur2];
}
dp[k1][k2][cur1][cur2] = solve(k1 - 1, k2, l1, l2, cur1+1, 0) + solve(k1, k2 - 1, l1, l2, 0, cur2+1);
dp[k1][k2][cur1][cur2] %= mod;
return dp[k1][k2][cur1][cur2];
}
int main()
{
fast;
ll k1, k2, l1, l2;
cin >> k1 >> k2 >> l1 >> l2;
memset(dp,-1,sizeof(dp));
cout<<solve(k1,k2,l1,l2,0,0);
return 0;
}
1302. Deepest Leaves Sum | 1209. Remove All Adjacent Duplicates in String II |
994. Rotting Oranges | 983. Minimum Cost For Tickets |
973. K Closest Points to Origin | 969. Pancake Sorting |
967. Numbers With Same Consecutive Differences | 957. Prison Cells After N Days |
946. Validate Stack Sequences | 921. Minimum Add to Make Parentheses Valid |
881. Boats to Save People | 497. Random Point in Non-overlapping Rectangles |
528. Random Pick with Weight | 470. Implement Rand10() Using Rand7() |
866. Prime Palindrome | 1516A - Tit for Tat |
622. Design Circular Queue | 814. Binary Tree Pruning |
791. Custom Sort String | 787. Cheapest Flights Within K Stops |
779. K-th Symbol in Grammar | 701. Insert into a Binary Search Tree |
429. N-ary Tree Level Order Traversal | 739. Daily Temperatures |
647. Palindromic Substrings | 583. Delete Operation for Two Strings |
518. Coin Change 2 | 516. Longest Palindromic Subsequence |
468. Validate IP Address | 450. Delete Node in a BST |